home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programmer Plus 2007
/
Programmer-Plus-2007.iso
/
Programming
/
Student most wanted Languages
/
Turbo C v3.0
/
Tc3setup.exe
/
EXAMPLES
/
INTRO25.CPP
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1992-02-18
|
399 b
|
24 lines
//INTRO25.CPP--Example from Chapter 3, "An Introduction to C++"
#include <iostream.h>
#include <string.h>
#include <conio.h>
int main()
{
int i;
char text[80];
cout << "Type \"end\" to quit\n";
for(cin.getline(text,80);strcmp(text,"end") !=0; cin.getline(text,80))
{
for(i = 1; i <= strlen(text); i++)
{
cout << "-";
}
cout << '\n';
}
return 0;
}